import React, { Component } from 'react'
import {
  BrowserRouter as Router,
  Redirect,
  Route,
  Switch,
} from 'react-router-dom'
import Home from '@/pages/Home'
import City from '@/pages/City'
import Map from '@/pages/Map'
import NotFound from './pages/NotFound'

export default class App extends Component {
  render() {
    return (
      <Router>
        <div className="app">
          <Switch>
            <Redirect exact from="/" to="/home">
              {' '}
            </Redirect>
            <Route path="/home" component={Home}></Route>
            <Route path="/City" component={City}></Route>
            <Route path="/Map" component={Map}></Route>
            <Route component={NotFound}></Route>
          </Switch>
        </div>
      </Router>
    )
  }
}
